﻿using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Shape.Mvp.Sample.Conversations.Domain.Repositories;

namespace Shape.Mvp.Sample.IoC.Installers
{
   public class RepositoryInstaller : IWindsorInstaller
   {
      public void Install(IWindsorContainer container, IConfigurationStore store)
      {
         container.Register(Classes.FromThisAssembly()
                           .BasedOn(typeof(IRepository<>))
                           .WithServiceFromInterface()
                           .LifestyleSingleton());
      }
   }
}
